@extends('layouts.default')

@section('title')
    操作翻译 @parent
@stop

@section('content')

    <div class="col-md-9 topics-index main-col">
        <div class="panel panel-default" style="box-shadow: 4px 4px 5px 0px rgba(50, 50, 50, 0.19);">

            <div class="panel-heading">

                <ul class="list-inline topic-filter">
                    <li class="popover-with-html" data-content="全部翻译">
                        <a href="{{route('admin-translate.index')}}">全部</a></li>
                    <li class="popover-with-html" data-content="待翻译">
                        <a href="{{route('admin-translate.index',['translate_status' => \App\Models\Topic::NOT_TRANSLATED])}}">待翻译</a>
                    </li>
                    <li class="popover-with-html" data-content="已翻译">
                        <a href="{{route('admin-translate.index',['translate_status' => \App\Models\Topic::IS_TRANSLATED])}}">已翻译</a>
                    </li>
                    <li class="popover-with-html" data-content="等待审核的翻译">
                        <a href="{{route('record-index',['status' => \App\Models\TranslateRecord::STATUS_NOT_AUDIT])}}">待审核</a>
                    </li>
                    <li class="popover-with-html" data-content="通过审核的翻译">
                        <a href="{{route('record-index',['status' => \App\Models\TranslateRecord::STATUS_AUDIT_PASS])}}">审核通过</a>
                    </li>
                    <li class="popover-with-html" data-content="未通过审核的翻译">
                        <a href="{{route('record-index',['status' => \App\Models\TranslateRecord::STATUS_AUDIT_NOT_PASS])}}">审核未通过</a>
                    </li>

                </ul>

                <div class="clearfix"></div>
            </div>

            @if(isset($records))
                <div class="jscroll">
                    <div class="panel-body remove-padding-horizontal">
                        @include('translate.partials.record_list')
                    </div>

                    <div class="panel-footer text-right remove-padding-horizontal pager-footer">
                        <!-- Pager -->
                        {!! $records->appends(Request::except('page', '_pjax'))->render() !!}
                    </div>
                </div>
            @elseif(isset($topics))
                <div class="jscroll">
                    <div class="panel-body remove-padding-horizontal">
                        @include('translate.partials.translate_list')
                    </div>

                    <div class="panel-footer text-right remove-padding-horizontal pager-footer">
                        <!-- Pager -->
                        {!! $topics->appends(Request::except('page', '_pjax'))->render() !!}
                    </div>
                </div>
            @endif


        </div>

    </div>

    @include('translate.partials.admin_sidebar')

@stop
